package com.dong.applicationcontext.i18n;

import org.springframework.context.MessageSource;

import java.util.Locale;

/**
 * description
 *
 * @author Administrator 2021/09/06 19:29
 */
public class Example {

    private MessageSource messageSource;

    public void setMessageSource(MessageSource messageSource) {
        this.messageSource = messageSource;
    }

    public void execute(){
        String message = this.messageSource.getMessage("argument.required",new Object[]{"userDao","userService"},"Required", Locale.ENGLISH);
        System.out.println(message);
    }
}
